package com.datounet.flutterapp.methodChannel;

import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;

/**
 * @author 41784
 */
public class OnMethodCallDelegate {

    void dispatch(MethodCall call, MethodChannel.Result result) {
        switch (call.method) {
            //处理来自Dart的方法调用
            case MethodTypes.INVOKE_DEMO:
                result.success("MethodChannelPlugin收到：" + call.arguments);
                //返回结果给Dart
                break;
            default:
                result.notImplemented();
        }
    }
}



